<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="__PUBLIC__/Js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/ghulam.js"></script>
</head>
<body >
<div class="container-fluid" >
    <div class="row">
        <h3 class="sub-header">友情链接列表</h3>
        <div class="col-sm-9  " style="width: 100%">

            <a href="<?php echo U(GROUP_NAME.'/Link/addlink');?>" class="btn btn-primary">添加友情链接</a>

            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>网站名称</th>
                        <th>网站网址</th>
                        <th>网站logo</th>
                        <th>排序</th>
                        <th>添加时间</th>
                        <th>添加人</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if(is_array($data)): foreach($data as $key=>$v): ?><tr>
                            <td><?php echo ($v["id"]); ?></td>
                            <td><?php echo ($v["title"]); ?></td>
                            <td><?php echo ($v["lin_url"]); ?></td>
                            <td><img width="130px" height="35px" src="__UPLOAD_LIN_IMG__/<?php echo ($v["lin_img"]); ?>"/></td>
                            <td><?php echo ($v["lin_sort"]); ?></td>
                            <td><?php echo ($v["add_time"]); ?></td>
                            <td><?php echo ($v["adder_name"]); ?></td>
                            <td>
                                        <a href="<?php echo U(GROUP_NAME.'/Link/edit', array('id' => $v['id']));?>" class="btn button-primary btn-xs">编辑</a>

                                    <a onclick="return del();" href="<?php echo U(GROUP_NAME.'/Link/delete', array('id' => $v['id']));?>" class="btn btn-danger btn-xs">删除</a>

                            </td>
                        </tr><?php endforeach; endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>


<link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/bootstrap/css/button.css" rel="stylesheet">
<script src="__PUBLIC__/bootstrap/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/bootstrap/js/bootstrap.js"></script>
</body>
</html>